import request from '@/utils/request'
/**
 * 一定时间订单总数
 * @param {star,end} params
 */
export const getOrderCount = (params) => {
  return request({
    method: 'get',
    url: '/api/order-service/report/orderCount',
    params
  })
}
/**
 * 一段时间之内的收入
 * @param {star,end} params
 */
export const getOrderAmount = (params) => {
  return request({
    method: 'get',
    url: '/api/order-service/report/orderAmount',
    params
  })
}
/**
 * 获取销售前几的商品
 * @param {topValue} v
 * @param {star} s
 * @param {end} e
 */
export const getSkuTop = (v, s, e) => {
  return request({
    method: 'get',
    url: `/api/order-service/report/skuTop/${v}/${s}/${e}`
  })
}
// 一定时间内销售数据
export const getOrderAmountCollect = (v, s, e) => {
  return request({
    method: 'get',
    url: `api/order-service/report/amountCollect/${v}/${s}/${e}`
  })
}
// 一段事件内区域销售量
export const getRegionCollect = (s, e) => {
  return request({
    method: 'get',
    url: `api/order-service/report/regionCollect/${s}/${e}`
  })
}
// 合作商点数
export const getNodeCollect = () => {
  return request({
    method: 'get',
    url: '/api/vm-service/node/nodeCollect'
  })
}
// 合作商总点数
export const getNodeCount = () => {
  return request({
    method: 'get',
    url: 'api/vm-service/node/count'
  })
}
// 合作商数量
export const getPartnerCount = () => {
  return request({
    method: 'get',
    url: 'api/user-service/partner/count'
  })
}
